package com.weixin.gong.example.jdk.bean;

import org.junit.Assert;
import org.junit.Test;

import java.util.HashSet;
import java.util.Set;

/**
 * Created at 2017/9/1 17:34
 *
 * @author gongweixin
 */
public class SetExample {

    @Test
    public void testToString() {
        Set<String> set = new HashSet<String>();
        set.add("1");
        set.add("a");
        Assert.assertEquals("[1, a]", String.format("%s", set));
    }
}
